package com.jianyun.jyzs.dao;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by mlli on 2017/12/12.
 * 应用界面的条目 存储
 */

@DatabaseTable
public class ItemModel {
    @DatabaseField(generatedId = true)
    private int id;
    @DatabaseField
    private String title;
    @DatabaseField
    private int imgRes;
    @DatabaseField
    private boolean unRead = false;
    @DatabaseField
    private int indexId;
    @DatabaseField
    private String userId;//此条目的用户ID
    @DatabaseField
    private String enterpriseCode;
    @DatabaseField
    private int type = 0;//0 top 1 menu

    public ItemModel() {
    }

    public ItemModel(String title, int imgRes, boolean unRead, int indexId, String userId, String enterpriseCode, int type) {
        this.title = title;
        this.imgRes = imgRes;
        this.unRead = unRead;
        this.indexId = indexId;
        this.userId = userId;
        this.enterpriseCode = enterpriseCode;
        this.type = type;
    }

    public ItemModel(String title, int imgRes, boolean unRead, int indexId, String userId, String enterpriseCode) {
        this.title = title;
        this.imgRes = imgRes;
        this.unRead = unRead;
        this.indexId = indexId;
        this.userId = userId;
        this.enterpriseCode = enterpriseCode;
    }

    @Override
    public String toString() {
        return "ItemModel{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", imgRes=" + imgRes +
                ", unRead=" + unRead +
                ", indexId=" + indexId +
                ", userId='" + userId + '\'' +
                ", enterpriseCode='" + enterpriseCode + '\'' +
                '}';
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getImgRes() {
        return imgRes;
    }

    public void setImgRes(int imgRes) {
        this.imgRes = imgRes;
    }

    public boolean isUnRead() {
        return unRead;
    }

    public void setUnRead(boolean unRead) {
        this.unRead = unRead;
    }

    public int getIndexId() {
        return indexId;
    }

    public void setIndexId(int indexId) {
        this.indexId = indexId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getEnterpriseCode() {
        return enterpriseCode;
    }

    public void setEnterpriseCode(String enterpriseCode) {
        this.enterpriseCode = enterpriseCode;
    }
}
